<%@ page contentType="text/html; charset=utf-8" language="java" %>
<%@ taglib prefix="s" uri="/struts-tags"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>懒人家居后台管理</title>
<link href="admin.css" rel="stylesheet" type="text/css" />
</head>
<body>
<%
	String uri = "listSofa.action";
%>
<table width="100%" height="500" border="0" cellpadding="0" cellspacing="0" class="whiteTable" style="white-space:normal;word-break:break-all;">
  <tr>
    <td width="90%" class="pathBg" align="left" valign="middle">&nbsp;&nbsp;沙发管理 &gt;&gt; 沙发列表</td>
    <td width="10%" class="pathBg" align="left" valign="middle"><a href="#" onClick="javascript:document.location.href='toAddSofa.action';" class="add">添加</a></td>
  </tr>
  <tr>
    <td height="440" colspan="2" align="left" valign="top"><table width="98%" border="0" align="center" cellpadding="0" cellspacing="0">
      <tr class="header">
        <td width="50" height="30" align="center">序号</td>
        <td>品名</td>
		<td width="150" align="center">库存</td>
        <td width="50" align="center">价格</td>
        <td width="50" align="center">推荐度</td>
        <td width="50" align="center">特价</td>
        <td width="50" align="center">新品</td>
        <td width="220">&nbsp;</td>
      </tr>
	  <s:iterator value="results" status="result">
      <tr class="<s:if test='#result.odd==true'>odd</s:if><s:else>even</s:else>">
        <td height="20" align="center">&nbsp;
          <s:property value="#result.index+1"/></td>
        <td>&nbsp;<a href="viewSofa.action?id=<s:property value='id'/>"><s:property value="name"/></a></td>
        <td align="center">&nbsp;
          <s:property value="number"/></td>
		<td align="right">&nbsp;
          <s:property value="prize"/></td>
        <td align="center">&nbsp;
          <s:property value="recommend"/></td>
        <td align="center">&nbsp;
          <s:if test="%{discounted}">√</s:if></td>
        <td align="center">&nbsp;
          <s:if test="%{fresh}">√</s:if></td>
        <td width="220" align="right"><s:if test="%{discounted}"><a href="makeunDiscount.action?id=<s:property value="id"/>">取消特价</a></s:if><s:else><a href="makeDiscount.action?id=<s:property value="id"/>">设为特价</a></s:else>&nbsp;<s:if test="%{fresh}"><a href="makeunFresh.action?id=<s:property value="id"/>">取消新品</a></s:if><s:else><a href="makeFresh.action?id=<s:property value="id"/>">设为新品</a></s:else>&nbsp;<a href="toModSofa.action?id=<s:property value="id" />">修改</a>&nbsp;<a onClick="if(confirm('确定删除该沙发吗?')){window.location.href='delSofa.action?id=<s:property value="id"/>'}" href="#">删除</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>
      </tr>
	  </s:iterator>
    </table></td>
  </tr>
  <tr>
    <td height="20" colspan="2" align="left" valign="top"><%@ include file="page.jsp"%></td>
  </tr>
</table>
</body>
</html>
